export const PrimitiveManagerAbi = [
  {
    inputs: [
      { internalType: "address", name: "factory_", type: "address" },
      { internalType: "address", name: "WETH9_", type: "address" },
      { internalType: "address", name: "positionDescriptor_", type: "address" },
    ],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    inputs: [
      { internalType: "uint256", name: "balance", type: "uint256" },
      { internalType: "uint256", name: "requiredAmount", type: "uint256" },
    ],
    name: "BalanceTooLowError",
    type: "error",
  },
  { inputs: [], name: "DeadlineReachedError", type: "error" },
  { inputs: [], name: "EngineNotDeployedError", type: "error" },
  { inputs: [], name: "InvalidSigError", type: "error" },
  { inputs: [], name: "LockedError", type: "error" },
  { inputs: [], name: "MinLiquidityOutError", type: "error" },
  { inputs: [], name: "MinRemoveOutError", type: "error" },
  { inputs: [], name: "NotEngineError", type: "error" },
  { inputs: [], name: "OnlyWETHError", type: "error" },
  { inputs: [], name: "SigExpiredError", type: "error" },
  { inputs: [], name: "TransferError", type: "error" },
  { inputs: [], name: "WrongConstructorParametersError", type: "error" },
  { inputs: [], name: "ZeroDelError", type: "error" },
  { inputs: [], name: "ZeroLiquidityError", type: "error" },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "recipient",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: true,
        internalType: "bytes32",
        name: "poolId",
        type: "bytes32",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delLiquidity",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delRisky",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delStable",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "bool",
        name: "fromMargin",
        type: "bool",
      },
    ],
    name: "Allocate",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "account",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "operator",
        type: "address",
      },
      { indexed: false, internalType: "bool", name: "approved", type: "bool" },
    ],
    name: "ApprovalForAll",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: true,
        internalType: "bytes32",
        name: "poolId",
        type: "bytes32",
      },
      {
        indexed: false,
        internalType: "uint128",
        name: "strike",
        type: "uint128",
      },
      { indexed: false, internalType: "uint32", name: "sigma", type: "uint32" },
      {
        indexed: false,
        internalType: "uint32",
        name: "maturity",
        type: "uint32",
      },
      { indexed: false, internalType: "uint32", name: "gamma", type: "uint32" },
      {
        indexed: false,
        internalType: "uint256",
        name: "delLiquidity",
        type: "uint256",
      },
    ],
    name: "Create",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "recipient",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "risky",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "stable",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delRisky",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delStable",
        type: "uint256",
      },
    ],
    name: "Deposit",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: true,
        internalType: "bytes32",
        name: "poolId",
        type: "bytes32",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delLiquidity",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delRisky",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delStable",
        type: "uint256",
      },
    ],
    name: "Remove",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "recipient",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: true,
        internalType: "bytes32",
        name: "poolId",
        type: "bytes32",
      },
      {
        indexed: false,
        internalType: "bool",
        name: "riskyForStable",
        type: "bool",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "deltaIn",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "deltaOut",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "bool",
        name: "fromMargin",
        type: "bool",
      },
      { indexed: false, internalType: "bool", name: "toMargin", type: "bool" },
    ],
    name: "Swap",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "operator",
        type: "address",
      },
      { indexed: true, internalType: "address", name: "from", type: "address" },
      { indexed: true, internalType: "address", name: "to", type: "address" },
      {
        indexed: false,
        internalType: "uint256[]",
        name: "ids",
        type: "uint256[]",
      },
      {
        indexed: false,
        internalType: "uint256[]",
        name: "values",
        type: "uint256[]",
      },
    ],
    name: "TransferBatch",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "operator",
        type: "address",
      },
      { indexed: true, internalType: "address", name: "from", type: "address" },
      { indexed: true, internalType: "address", name: "to", type: "address" },
      { indexed: false, internalType: "uint256", name: "id", type: "uint256" },
      {
        indexed: false,
        internalType: "uint256",
        name: "value",
        type: "uint256",
      },
    ],
    name: "TransferSingle",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      { indexed: false, internalType: "string", name: "value", type: "string" },
      { indexed: true, internalType: "uint256", name: "id", type: "uint256" },
    ],
    name: "URI",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "payer",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "recipient",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "engine",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "risky",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "stable",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delRisky",
        type: "uint256",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "delStable",
        type: "uint256",
      },
    ],
    name: "Withdraw",
    type: "event",
  },
  {
    inputs: [],
    name: "DOMAIN_SEPARATOR",
    outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "WETH9",
    outputs: [{ internalType: "address", name: "", type: "address" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "recipient", type: "address" },
      { internalType: "bytes32", name: "poolId", type: "bytes32" },
      { internalType: "address", name: "risky", type: "address" },
      { internalType: "address", name: "stable", type: "address" },
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
      { internalType: "bool", name: "fromMargin", type: "bool" },
      { internalType: "uint256", name: "minLiquidityOut", type: "uint256" },
    ],
    name: "allocate",
    outputs: [
      { internalType: "uint256", name: "delLiquidity", type: "uint256" },
    ],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "allocateCallback",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "account", type: "address" },
      { internalType: "uint256", name: "id", type: "uint256" },
    ],
    name: "balanceOf",
    outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address[]", name: "accounts", type: "address[]" },
      { internalType: "uint256[]", name: "ids", type: "uint256[]" },
    ],
    name: "balanceOfBatch",
    outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "risky", type: "address" },
      { internalType: "address", name: "stable", type: "address" },
      { internalType: "uint128", name: "strike", type: "uint128" },
      { internalType: "uint32", name: "sigma", type: "uint32" },
      { internalType: "uint32", name: "maturity", type: "uint32" },
      { internalType: "uint32", name: "gamma", type: "uint32" },
      { internalType: "uint256", name: "riskyPerLp", type: "uint256" },
      { internalType: "uint256", name: "delLiquidity", type: "uint256" },
    ],
    name: "create",
    outputs: [
      { internalType: "bytes32", name: "poolId", type: "bytes32" },
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
    ],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "createCallback",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "recipient", type: "address" },
      { internalType: "address", name: "risky", type: "address" },
      { internalType: "address", name: "stable", type: "address" },
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
    ],
    name: "deposit",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "depositCallback",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "factory",
    outputs: [{ internalType: "address", name: "", type: "address" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "account", type: "address" },
      { internalType: "address", name: "operator", type: "address" },
    ],
    name: "isApprovedForAll",
    outputs: [{ internalType: "bool", name: "", type: "bool" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "", type: "address" },
      { internalType: "address", name: "", type: "address" },
    ],
    name: "margins",
    outputs: [
      { internalType: "uint128", name: "balanceRisky", type: "uint128" },
      { internalType: "uint128", name: "balanceStable", type: "uint128" },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [{ internalType: "bytes[]", name: "data", type: "bytes[]" }],
    name: "multicall",
    outputs: [{ internalType: "bytes[]", name: "results", type: "bytes[]" }],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [{ internalType: "address", name: "", type: "address" }],
    name: "nonces",
    outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "owner", type: "address" },
      { internalType: "address", name: "operator", type: "address" },
      { internalType: "bool", name: "approved", type: "bool" },
      { internalType: "uint256", name: "deadline", type: "uint256" },
      { internalType: "uint8", name: "v", type: "uint8" },
      { internalType: "bytes32", name: "r", type: "bytes32" },
      { internalType: "bytes32", name: "s", type: "bytes32" },
    ],
    name: "permit",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "positionDescriptor",
    outputs: [{ internalType: "address", name: "", type: "address" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "refundETH",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "engine", type: "address" },
      { internalType: "bytes32", name: "poolId", type: "bytes32" },
      { internalType: "uint256", name: "delLiquidity", type: "uint256" },
      { internalType: "uint256", name: "minRiskyOut", type: "uint256" },
      { internalType: "uint256", name: "minStableOut", type: "uint256" },
    ],
    name: "remove",
    outputs: [
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "from", type: "address" },
      { internalType: "address", name: "to", type: "address" },
      { internalType: "uint256[]", name: "ids", type: "uint256[]" },
      { internalType: "uint256[]", name: "amounts", type: "uint256[]" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "safeBatchTransferFrom",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "from", type: "address" },
      { internalType: "address", name: "to", type: "address" },
      { internalType: "uint256", name: "id", type: "uint256" },
      { internalType: "uint256", name: "amount", type: "uint256" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "safeTransferFrom",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "token", type: "address" },
      { internalType: "uint256", name: "value", type: "uint256" },
      { internalType: "uint256", name: "deadline", type: "uint256" },
      { internalType: "uint8", name: "v", type: "uint8" },
      { internalType: "bytes32", name: "r", type: "bytes32" },
      { internalType: "bytes32", name: "s", type: "bytes32" },
    ],
    name: "selfPermit",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "token", type: "address" },
      { internalType: "uint256", name: "nonce", type: "uint256" },
      { internalType: "uint256", name: "expiry", type: "uint256" },
      { internalType: "uint8", name: "v", type: "uint8" },
      { internalType: "bytes32", name: "r", type: "bytes32" },
      { internalType: "bytes32", name: "s", type: "bytes32" },
    ],
    name: "selfPermitAllowed",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "token", type: "address" },
      { internalType: "uint256", name: "nonce", type: "uint256" },
      { internalType: "uint256", name: "expiry", type: "uint256" },
      { internalType: "uint8", name: "v", type: "uint8" },
      { internalType: "bytes32", name: "r", type: "bytes32" },
      { internalType: "bytes32", name: "s", type: "bytes32" },
    ],
    name: "selfPermitAllowedIfNecessary",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "token", type: "address" },
      { internalType: "uint256", name: "value", type: "uint256" },
      { internalType: "uint256", name: "deadline", type: "uint256" },
      { internalType: "uint8", name: "v", type: "uint8" },
      { internalType: "bytes32", name: "r", type: "bytes32" },
      { internalType: "bytes32", name: "s", type: "bytes32" },
    ],
    name: "selfPermitIfNecessary",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "operator", type: "address" },
      { internalType: "bool", name: "approved", type: "bool" },
    ],
    name: "setApprovalForAll",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
    name: "supportsInterface",
    outputs: [{ internalType: "bool", name: "", type: "bool" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        components: [
          { internalType: "address", name: "recipient", type: "address" },
          { internalType: "address", name: "risky", type: "address" },
          { internalType: "address", name: "stable", type: "address" },
          { internalType: "bytes32", name: "poolId", type: "bytes32" },
          { internalType: "bool", name: "riskyForStable", type: "bool" },
          { internalType: "uint256", name: "deltaIn", type: "uint256" },
          { internalType: "uint256", name: "deltaOut", type: "uint256" },
          { internalType: "bool", name: "fromMargin", type: "bool" },
          { internalType: "bool", name: "toMargin", type: "bool" },
          { internalType: "uint256", name: "deadline", type: "uint256" },
        ],
        internalType: "struct ISwapManager.SwapParams",
        name: "params",
        type: "tuple",
      },
    ],
    name: "swap",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
      { internalType: "bytes", name: "data", type: "bytes" },
    ],
    name: "swapCallback",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "token", type: "address" },
      { internalType: "uint256", name: "amountMin", type: "uint256" },
      { internalType: "address", name: "recipient", type: "address" },
    ],
    name: "sweepToken",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [
      { internalType: "uint256", name: "amountMin", type: "uint256" },
      { internalType: "address", name: "recipient", type: "address" },
    ],
    name: "unwrap",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  {
    inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
    name: "uri",
    outputs: [{ internalType: "string", name: "", type: "string" }],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      { internalType: "address", name: "recipient", type: "address" },
      { internalType: "address", name: "engine", type: "address" },
      { internalType: "uint256", name: "delRisky", type: "uint256" },
      { internalType: "uint256", name: "delStable", type: "uint256" },
    ],
    name: "withdraw",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [{ internalType: "uint256", name: "value", type: "uint256" }],
    name: "wrap",
    outputs: [],
    stateMutability: "payable",
    type: "function",
  },
  { stateMutability: "payable", type: "receive" },
] as const;
